package com.firstpro.dao;


import org.springframework.stereotype.Repository;
import com.firstpro.domain.*;
import javax.transaction.Transactional;

/**
 * Created by Administrator on 2017/5/24.
 */
@Repository
@Transactional
public class UserDao extends BaseDao<UserEntity>{
    public int getUserByUserName(String userName){
        String hql = "from UserEntity U where U.userName = ?";
        if(super.find(hql,userName).size()>0)
            return 1;
        else return -1;
    }

}
